diff -Naur rustc-1.21.0-src.bak/src/librustc_llvm/build.rs rustc-1.21.0-src/src/librustc_llvm/build.rs
--- rustc-1.21.0-src.bak/src/librustc_llvm/build.rs	2017-10-10 09:04:51.000000000 +1300
+++ rustc-1.21.0-src/src/librustc_llvm/build.rs	2017-10-14 15:28:56.761081727 +1300
@@ -221,6 +221,8 @@
         println!("cargo:rustc-link-lib={}={}", kind, name);
     }
 
+    println!("cargo:rustc-link-lib=dylib=ffi");
+
     // LLVM ldflags
     //
     // If we're a cross-compile of LLVM then unfortunately we can't trust these
